package com.jinxin.platform.cdfaceacs.mapper;

import com.jinxin.platform.cdfaceacs.pojo.domains.CdattendancerecordRecord;
import com.jinxin.platform.cdfaceacs.pojo.domains.CdattendancerecordUser;
import com.jinxin.platform.cdfaceacs.pojo.dto.UserMonthDto;
import com.jinxin.platform.cdfaceacs.pojo.form.AppMonthForm;
import com.jinxin.platform.cdfaceacs.pojo.form.AppPageForm;
import com.jinxin.platform.cdfaceacs.pojo.form.RecordPageForm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 考勤记录模块-记录汇总表(CdattendancerecordRecord)表数据库访问层
 *
 * @author yangjie
 * @since 2021-04-23 10:03:07
 */
@Mapper
public interface CdattendancerecordRecordMapper {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    CdattendancerecordRecord queryById(String id);

    /**
     * 通过实体作为筛选条件查询
     *
     * @param cdattendancerecordRecord 实例对象
     * @return 对象列表
     */
    List<CdattendancerecordRecord> queryAll(CdattendancerecordRecord cdattendancerecordRecord);

    /**
     * 新增数据
     *
     * @param cdattendancerecordRecord 实例对象
     * @return 影响行数
     */
    int insert(CdattendancerecordRecord cdattendancerecordRecord);

    /**
     * 修改数据
     *
     * @param cdattendancerecordRecord 实例对象
     * @return 影响行数
     */
    int update(CdattendancerecordRecord cdattendancerecordRecord);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 影响行数
     */
    int deleteById(String id);

    List<CdattendancerecordRecord> pageRecordList(AppPageForm pageForm);

    List<CdattendancerecordRecord> getByMonth(AppMonthForm monthForm);

    List<CdattendancerecordRecord> getByWorkNoAndMonth(@Param("workNo") String workNo, @Param("date") Date nowDate);

    CdattendancerecordRecord getByWorkNoAndDate(@Param("workNo") String workNo, @Param("date") Date nowDate);

    List<CdattendancerecordRecord> webPageRecordList(RecordPageForm pageForm);

    List<CdattendancerecordRecord> getTodayRecord();

    List<UserMonthDto> pageUserByMonthList(RecordPageForm pageForm);

    void updateUserName(CdattendancerecordUser result);

    void updateOrgName(CdattendancerecordUser result);

    List<Map> countByClockStatus();
}
